package web

import (
	"github.com/gin-gonic/gin"
	"msgserver/db"
	"msgserver/server/web/controller"
	"msgserver/server/web/middleware"
)

func Init(router *gin.Engine) {
	// 测试数据库 并且初始化数据库
	db.TestDB()
	initRouter(router)
}

func initRouter(router *gin.Engine) {
	//跨域配置
	router.Use(middleware.Cors())
	router.Any("account/register", controller.DefaultAccountController.Register)
}
